/**
 * Carousel 组件的主题配置
 * 
 * 基于企业级设计规范 (Carousel.json) 的完整配置
 * 走马灯组件样式定义
 */

import type { ComponentToken } from 'antd/es/carousel/style';

// ========== 设计 Token 常量 ==========

/**
 * 指示点相关 Token
 */
const DOT_TOKENS = {
  dotWidth: 16,
  dotHeight: 3,
  dotGap: 4,
  dotOffset: 12,
  dotActiveWidth: 24,
} as const;

/**
 * 箭头相关 Token
 */
const ARROW_TOKENS = {
  arrowSize: 16,
  arrowOffset: 8,
} as const;

/**
 * Carousel 完整主题配置
 */
export const carouselThemeConfig: Partial<ComponentToken> = {
  // ========== 指示点配置 ==========
  dotWidth: DOT_TOKENS.dotWidth,
  dotHeight: DOT_TOKENS.dotHeight,
  dotGap: DOT_TOKENS.dotGap,
  dotOffset: DOT_TOKENS.dotOffset,
  dotActiveWidth: DOT_TOKENS.dotActiveWidth,

  // ========== 箭头配置 ==========
  arrowSize: ARROW_TOKENS.arrowSize,
  arrowOffset: ARROW_TOKENS.arrowOffset,
};

export const getCarouselTheme = (
  customConfig?: Partial<ComponentToken>
): Partial<ComponentToken> => {
  return {
    ...carouselThemeConfig,
    ...customConfig,
  };
};

export type { ComponentToken as CarouselComponentToken } from 'antd/es/carousel/style';

